home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 April / PC för Alla 0504.iso / noje / arcade-3.6.exe / tetris.swf / scripts / frame_3 / DoAction.as
Encoding:
Text File  |  2003-11-29  |  569 b   |  35 lines

  1. stop();
  2. checkButtons = function()
  3. {
  4.    if(startLevel < 2)
  5.    {
  6.       down_btn._alpha = 50;
  7.       down_btn.enabled = false;
  8.    }
  9.    else if(startLevel > 9)
  10.    {
  11.       up_btn._alpha = 50;
  12.       up_btn.enabled = false;
  13.    }
  14.    else
  15.    {
  16.       up_btn._alpha = down_btn._alpha = 100;
  17.       up_btn.enabled = down_btn.enabled = true;
  18.    }
  19. };
  20. checkButtons();
  21. down_btn.onPress = function()
  22. {
  23.    startLevel--;
  24.    checkButtons();
  25. };
  26. up_btn.onPress = function()
  27. {
  28.    startLevel++;
  29.    checkButtons();
  30. };
  31. ok_btn.onPress = function()
  32. {
  33.    play();
  34. };
  35.